﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard;
using System.Web.Mvc;

namespace MediaGarden.Playlists.Services
{
    public interface IPlaylistService : IDependency
    {
        /// <summary>
        /// Emits a playlist from a playlist media item
        /// </summary>
        /// <param name="item"></param>
        /// <param name="routeValues"></param>
        /// <returns></returns>
        PlaylistContext BuildPlaylist(MediaGarden.Models.IMediaItem item, System.Web.Routing.RouteValueDictionary routeValues);

        /// <summary>
        /// Builds a single-item playlist of a specific media item (using same media player if it supports playlists?)
        /// </summary>
        /// <param name="item"></param>
        /// <param name="routeValues"></param>
        /// <returns></returns>
        PlaylistContext SingleItemPlaylist(MediaGarden.Models.IMediaItem item, System.Web.Routing.RouteValueDictionary routeValues);

        /// <summary>
        /// Performs playlist writing for MVC and returns an action result
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        System.Web.Mvc.ActionResult MvcWritePlaylist(ControllerBase controller, PlaylistContext context);

        string DefaultPlaylistFormat(Models.IMediaItem item);
    }
}
